class SprocketzController < ApplicationController

  def index
    @buckets = Bucket.all :order => 'name asc'
    @axes = Axis.all :order => 'position asc'
    @settings = Setting.paginate :page => params[:page], :order => 'name asc'
  end

  def update_axes_positions
    params[:axes].each_with_index do |axis_id, position|
      Axis.update(axis_id, :position => position + 1)
    end
    render :partial => 'axes/axes_list', :locals => { :axes => Axis.prioritized }
  end

end
